package com.jevons.geo_lib.op_history;

import java.util.List;

/**
 * Copyright 2020 JxGIS
 *
 * @file BianjieCommonHistory
 * @auth linaisheng
 * Created on 2020/12/2.
 * Description：
 */
public class BianjieCommonHistory implements OperationHistory {

    private BianjieHistory.Type type;
    private List<BianjieHistory> bianjieHistories;

    public BianjieCommonHistory(BianjieHistory.Type type, List<BianjieHistory> bianjieHistories) {
        this.type = type;
        this.bianjieHistories = bianjieHistories;
    }

    public BianjieHistory.Type getType() {
        return type;
    }

    public List<BianjieHistory> getBianjieHistories() {
        return bianjieHistories;
    }

    public String getCommonKey() {
        if (bianjieHistories != null && bianjieHistories.size() > 0) {
            return bianjieHistories.get(0).getCommonKey();
        }
        return null;
    }

    @Override
    public String getOperateFlag() {
        return "op_bianjie_common";
    }

    @Override
    public DrawType getDrawType() {
        return DrawType.Bianjie;
    }
}
